package com.csxh.web.dao;

import java.util.LinkedHashMap;
import java.util.Map;

import com.csxh.web.util.JdbcUtil;

/**
 * 数据访问层
 * @author Administrator
 *
 */
public class QueryConditionDao {

	//查询表字段的结构信息：名称与类型
	public Map<String,Class<?> > findFieldSchema(Class<?> clazz){
		Map<String,Class<?> > map=new LinkedHashMap<String,Class<?>>();
		try {
			JdbcUtil.openConnection();
			
			map=JdbcUtil.selectSchema(clazz);
			
			
		} catch (Exception e) {

		} finally {
			JdbcUtil.closeConnection();
		}
		
		return map;
	}

	public Map<String, Class<?>> findFieldSchema(Class<?> clazz, String[] includeFields, String[] excludeFields) {
		Map<String,Class<?> > map=new LinkedHashMap<String,Class<?>>();
		try {
			JdbcUtil.openConnection();
			
			map=JdbcUtil.selectSchema(clazz,includeFields,excludeFields);
			
			
		} catch (Exception e) {

		} finally {
			JdbcUtil.closeConnection();
		}
		
		return map;
	}
}
